using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class GL_CategoryMap : EntityTypeConfiguration<GL_Category>
    {
        public GL_CategoryMap()
        {
            // Primary Key
            this.HasKey(t => t.GL_Cat_ID);

            // Properties
            this.Property(t => t.GL_Cat_Name)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("GL_Category");
            this.Property(t => t.GL_Cat_ID).HasColumnName("GL_Cat_ID");
            this.Property(t => t.GL_Cat_Name).HasColumnName("GL_Cat_Name");
        }
    }
}
